<?php

declare(strict_types=1);
/**
 * This file is part of Hyperf.
 *
 * @link     https://www.hyperf.io
 * @document https://hyperf.wiki
 * @contact  group@hyperf.io
 * @license  https://github.com/hyperf/hyperf/blob/master/LICENSE
 */
use Hyperf\HttpServer\Router\Router;
use Hyperf\Validation\Middleware\ValidationMiddleware;
use App\Middleware\ApiAgent;

/**
 * Api 路由控制
 */
Router::addGroup('/api', function () {
    require BASE_PATH . '/routes/api/routes.php';
}, [
    'middleware' => [
        // 业务中间件
        ApiAgent::class,
    ]
]);

/**
 * 其他 路由控制
 */
Router::addGroup('/other', function () {
    // ......
    // require BASE_PATH . '/routes/api/routes.php';
}, [
    'middleware' => [
        // 业务中间件
        // ApiAgent::class => 1,
    ]
]);
